s = ["h", "e", "l", "l", "o"]

var reverseString = function (s) {
    let len = s.length
    let i = 0, j = len - 1
    while (i < j) {
        [s[i], s[j]] = [s[j], s[i]]
        i++
        j--
    }
};
reverseString(s)
console.log(s);
